<template>
  <el-dialog :visible="isShowDialog">
    <el-form>
      <!-- 经纪 -->
      <el-form-item label="经纪">
        <el-input v-model="formData.agent" />
      </el-form-item>
      <!-- 分类 -->
      <el-form-item label="分类">
        <el-input v-model="formData.category" />
      </el-form-item>
      <!-- 标题 -->
      <el-form-item label="标题">
        <el-input v-model="formData.title" />
      </el-form-item>
      <!-- 标签 -->
      <el-form-item label="标签">
        <el-input v-model="formData.tags" />
      </el-form-item>
      <!-- 地址 -->
      <el-form-item label="地址">
        <el-input v-model="formData.address" />
      </el-form-item>
      <!-- 价格 -->
      <el-form-item label="价格">
        <el-input v-model="formData.price" />
      </el-form-item>
      <!-- 描述 -->
      <el-form-item label="描述">
        <el-input v-model="formData.desc" />
      </el-form-item>
      <!-- 内容 -->
      <el-form-item label="内容">
        <el-input v-model="formData.content" />
      </el-form-item>
      <!-- 介绍图片 -->
      <el-form-item label="介绍图片">
        <el-input v-model="formData.photos" />
      </el-form-item>
      <!-- 封面 -->
      <el-form-item label="封面">
        <el-input v-model="formData.image" />
      </el-form-item>
    </el-form>
    <!-- 页脚 -->
    <template #footer>
      <el-button size="small" type="primary" @click="btnOK">确定</el-button>
      <el-button size="small">取消</el-button>
    </template>
  </el-dialog>
</template>

<script>
import { addPropetyForm } from '@/api/property'
export default {
  props: {
    isShowDialog: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      formData: {
        title: '',
        desc: '',
        image: '',
        agent: '',
        content: '',
        address: '',
        price: '',
        photos: '',
        tags: '',
        category: ''
      }
    }
  },
  methods: {
    // 点击确定 新增房产
    async btnOK() {
      const res = await addPropetyForm(this.formData)
    }
  }
}
</script>

<style>

</style>
